import { createI18n } from 'vue-i18n';

import en from '../locales/en-US';
import zh from '../locales/zh-CN';
import hi from '../locales/hi-IN';

export const messages = {
  'en-US': en,
  'zh-CN': zh,
  'hi-IN': hi,
};

const defaultLang = 'zh-CN';

const i18n = createI18n({
  locale: defaultLang,
  fallbackLocale: defaultLang,
  allowComposition: true,
  globalInjection: true,
  messages,
});

export default i18n;

export const countryCodeOptions = [
  {
    id: "en-US",
    name: "English",
    title: 'EN',
    phone: "+ 44",
    icon: new URL("../assets/images/Home/united-kingdom.png", import.meta.url).href,
    code:"1"
  },
  {
    id: "zh-CN",
    name: "中文",
    title: '中文',
    phone: "+ 86",
    icon: new URL("../assets/images/Home/china.png", import.meta.url).href,
    code:"2"
  },
  {
    id: "hi-IN",
    name: "हिंदी",
    title: "हिंदी",
    phone: "+ 91",
    icon: new URL("../assets/images/Home/india.png", import.meta.url).href,
    code:"3"
  },
];
